#pragma once
#pragma once
#ifndef _BASE_OBJECT_H_
#define _BASE_OBJECT_H_
#include "BaseBody.h"
#include "cocos2d.h"
#include "Define.h"
using namespace cocos2d;
class BaseObject
{
protected:
	b2World *mWorld;
public:
	OBJECT_ID mId;
	BaseBody *mBody;
	Sprite *mSprite;
	bool mIsAction;
	bool mIsCollision;
	Action *mAnimation;
	BaseObject(b2World *_World);
	~BaseObject();	
	virtual void init(SpriteBatchNode* _Spritebatch, SpriteFrameCache* _Cache, Sprite *_Parent);
	virtual void update(float dt);
	virtual void draw();
	virtual void destroy();
	virtual void onCollisionWith(BaseObject *_Object);
	virtual void setActive(bool active);
	virtual void setPosition(b2Vec2 pos);
	virtual void setRotation(int rotation);

};
#endif _BASE_OBJECT_H_

